
# CLEAN
# =====
clean: 
	rm -rf __* sim.* zoix* *.log* simv* csrc *.log *Log fdb* novas.rc novas.conf *.fsdb vcst_* vcf* After* ./${SNPS_FDB_STORAGE_PATH} .certitudeGUI

# FDB SETUP 
# =========
setup_fdb:
	mkdir fdb_data
	fdb_control -init_database
	fdb_control -start_server
	fdb_control -new_project

# FDB DOWN
# ========
stop_fdb:
	fdb_control -stop_server -fdb_storage_path ${SNPS_FDB_STORAGE_PATH}
	rm -rf ./${SNPS_FDB_STORAGE_PATH}


# ZOIX COMPILE (needed for FDB)
# ===========================================
compile_zoix:
	zoix -w -f ../design/rtl.f -portfaults +fault+var -sverilog $* +suppress+cell +nolibcell

# VCS COMPILE (needed for FDB)
# ===========================================
compile_vcs:
	vcs -sverilog -design_dump_only -f ../design/rtl.f -full64


# FAULT GENERATION (use the sim database generated by ZOIX/VCS)
# ================
gen_fdb_zoix:
	${ZOIXHOME}/bin/vc_fcc -full64 -daidir zoix.sim.daidir -fault_test_coverage -sff ../sff/input.sff -dut_path test
gen_fdb_vcs:
	${VCS_HOME}/bin/vc_fcc -full64 -daidir simv.daidir -fault_test_coverage -sff ../sff/input.sff -dut_path test

 
# VC Formal Fusa
# ===================
run_vcf_fusa:
	vcf -f run.tcl -verdi &
